#pragma once

class IniFile: public IResource
{
public:
	IniFile(const std::string& path);
	~IniFile();

	int GetInteger(const std::string& section, const std::string& name, const int& defaultVal) const;
	float GetFloat(const std::string& section, const std::string& name, const float& defaultVal) const;
	std::string GetString(const std::string& section, const std::string& name, const std::string& defaultVal) const;

	const std::string& GetPath() const;
	void SetPath(const std::string& path);

private:
	IniFileItem* GetItem(const std::string&  section, const std::string&  name) const;
	IniFileSection* GetSection(const std::string&  section) const;

	void LoadFile();

	std::list<IniFileSection*> m_iniSectionsList;	//!<Lista sekcji
	std::string m_path;
};
